package com.wechet.serveice.impl;

import com.wechet.DAO.ProductCategoryDAO;
import com.wechet.domain.ProductCategory;
import com.wechet.serveice.ProductCategoryService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * Created by sc on 2017/9/20.
 */
@Service
public class ProductCategoryServiceImpl implements ProductCategoryService{

    @Autowired
    private ProductCategoryDAO productCategoryDAO;


    @Override
    public ProductCategory findOne(Integer categoryId) {
        return productCategoryDAO.findOne(categoryId);
    }

    @Override
    public List<ProductCategory> findAll() {
        return productCategoryDAO.findAll();
    }

    @Override
    public List<ProductCategory> findByCategoryTypeIn(List<Integer> categoryTypeList) {
        return productCategoryDAO.findByCategoryTypeIn(categoryTypeList);
    }

    @Override
    public ProductCategory save(ProductCategory productCategory) {
        return productCategoryDAO.save(productCategory);
    }
}
